<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/bootstrap/css/bootstrap.css">
</head>
<body>

    <div class="container">
        <h1>添加商品信息</h1>
        <form th:action="@{/brand/doSaveBrand}" method="post">

            <div class="form-group">
                <!-- for属性: 点击 name  , 会选中下面的表单-->
                <label for="nameId">name</label>
                <input type="text" class="form-control" id="nameId" placeholder="Brand Name" name="name">
            </div>

            <div class="form-group">
                <label for="remarkId">Remark</label>
                <textarea class="form-control" id="remarkId" rows="5" cols="100" placeholder="CreateTime" name="remark"></textarea>
            </div>




            <button type="submit" class="btn btn-default" onclick="addData()">Submit</button>
        </form>
    </div>

    <script type="text/javascript">

        function addData() {
            alert("进来每?");
            let name = document.forms[0].name.value;
            console.log(name);
            let remark = document.forms[0].name.value;
            console.log(remark);

        }



    </script>



</body>
</html>